/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

export function findDuplicates(array) {
  const set = new Set();
  const result = array.filter(item => {
    if (set.has(item)) {
      return true;
    }
    set.add(item);
    return false;
  });
  return [...new Set(result)];
}
